package cn.jtfadmin.base.shiro.config;


import cn.jtfadmin.base.lang.common.security.UserDetails;
import cn.jtfadmin.base.shiro.events.UserBuildSuccessEvent;
import org.apache.shiro.authc.AuthenticationToken;
import org.springframework.context.ApplicationListener;

import java.util.Optional;

/**
 * 用户Builder
 * @author jtf
 * @since 0.0.2
 */
public interface UserBuilder extends ApplicationListener<UserBuildSuccessEvent> {

    Optional<UserDetails> build(AuthenticationToken token);

    Optional<UserDetails> build(String userId, String userType);


}
